/*
 * core/UpdateCaller.java
 *
 * Call UpdateHandler s when an update is done on the object
 */

package net.kernub.kebcore.client;

import com.google.gwt.core.client.GWT;

import java.util.ArrayList;

import net.kernub.kebcore.client.UpdateHandler;

public class UpdateCaller
{
	private ArrayList<UpdateHandler> handlers = new ArrayList<UpdateHandler>();

	public UpdateCaller()
	{
	}

	protected void callUpdateHandlers()
	{
		for( UpdateHandler h : handlers )
		{
			h.onUpdate();
		}
	}

	public void addUpdateHandler( UpdateHandler handler )
	{
		handlers.add( handler );
	}

};


